{eval $header_title=$_HEAD[title]="发表/编辑文章";}
{include mobile_template('header')}
<div class="panel-comm panel-fullsize">
	<div class="panel-body">
		<div class="form-box">
			<form id="postform" name="postform" action="{url article/mobile/do/post/op/$op}" method="POST" 
			enctype="multipart/form-data" onsubmit="return true;">
				{if $op=='edit'}
				<input type="hidden" name="articleid" value="$articleid">
				{/if}
				<div class="form-item">
					<label for="subject">标题:</label>
					<input name="subject" id="subject" placeholder="请输入文章标题" value="$detail[subject]" type="text" required>
				</div>
				<div class="form-item">
					<label for="catid">分类:</label>
					<select name="catid" id="catid">
						{get:article val=category(pid/0)}
						<optgroup label="$val[name]">
							{get:article _val=category(pid/$val[catid])}
							<option value="$_val[catid]"{if $detail['catid']==$_val['catid']} selected="selected"{/if}>$val[name]</option>
							{/get}
  						</optgroup>
						{/get}
					</select>
				</div>
				<!--{if $role=='owner'}-->
				<div class="form-item">
                    <label for="mysubject">关联主题:</label>
                    <select id="mysubject" name="sid" required>
                        <!--{eval 
                        	G('loader')->helper('form','item');
                            if($detail[sid])
                                $sids = explode(',', $detail[sid]);
                            elseif($subject[sid])
                                $sids = array($subject[sid]);
                        }-->
                        <!--{print form_item_mysubject($user->uid, $sids)}-->
                    </select>
                    
				</div>
				<!--{/if}-->
				<div class="form-item">
					<label for="content">文章内容:</label>
					{$edit_html}
				</div>

				 <!--{if $op=='add' && $MOD[post_seccode]}-->
				<div class="form-item">
					<label>验证码:</label>
					<input name="seccode" id="seccode" placeholder="请输入右侧验证码" type="text" style="width:200px">
					<span data-name="seccode"></span>
				</div>
				<!--{/if}-->
				<div class="form-submit">
					<div class="btn-group-vertical full-width">
						<button type="submit" name="dosubmit" value="Y" class="btn btn-mycolor">提交</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
{include mobile_template('footer')}